﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace XinGuanERP.Models.Po.system
{
    public class Dept : PrivateCommonEntity<string>, IEntityTypeBuilder<Dept>
    {
        public string? DeptName { get; set; }
        public int? OrderNo { get; set; }
        public string? Status { get; set; }
        public string? ParentDept { get; set; }
        public string? Remark { get; set; }
        public void Configure(EntityTypeBuilder<Dept> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.ToTable("BASE_DEPT");
            entityBuilder.HasKey(t => t.Id);
            entityBuilder.Property(t => t.Id).HasColumnName("ID");
            entityBuilder.Property(t => t.DeptName).HasColumnName("DEPTNAME");
            entityBuilder.Property(t => t.OrderNo).HasColumnName("ORDERNO");
            entityBuilder.Property(t => t.Status).HasColumnName("STATUS");
            entityBuilder.Property(t => t.ParentDept).HasColumnName("PARENTDEPT");
            entityBuilder.Property(t => t.CreateTime).HasColumnName("CREATETIME");
            entityBuilder.Property(t => t.Remark).HasColumnName("REMARK");
            entityBuilder.Property(t => t.UpdateTime).HasColumnName("UPDATETIME");
            entityBuilder.Property(t => t.CreateUserId).HasColumnName("CREATEUSERID");
            entityBuilder.Property(t => t.CreateUserName).HasColumnName("CREATEUSERNAME");
            entityBuilder.Property(t => t.UpdateUserId).HasColumnName("UPDATEUSERID");
            entityBuilder.Property(t => t.UpdateUserName).HasColumnName("UPDATEUSERNAME");
        }


    }
}
